package library.item;



public class Book extends Item implements LibraryItem{
	
	public Book(String identifier, String author, String name, int pageCount, int year) {
		super(identifier, author, name);
		this.pages = pageCount;
		this.year = year;
	}

	int pages;
	int year;

	@Override
	public String getInfo() {
		StringBuilder info = new StringBuilder();
		info.append(pages).append(". pages. (").append(year).append("). ISBN ").append(getIdentifier());
		info.trimToSize();
		return info.toString();
	}

	@Override
	public String toString(){
		StringBuilder string =new StringBuilder();
		string.append(this.getData()).append(". ").append(this.getInfo());
		string.trimToSize();
		return string.toString();
	}
	

}
